;( function () {
	"use strict";
    var param_map = Result.getLocationParamObject();
    var descId = param_map.desc_id;
	
	$( function () {
		getDetail();
		
		
	}); 


	function getDetail(){
		var params = {
			"articleId" : descId,
		};
		$.ajax(getAjaxOps('/article/getArticleById', params)
		).done(function(res){
			var data = res.data;
			if(res.resultCode == 0) {
				$("#title").html(data.article_name);
		    	$("#createTime").html(data.create_time);
		    	$("#content").html(data.content);
            } else {
            	$("body").tips(res.data);
            }
	    });
		
	}
	
	/**
	 * 跳到首页
	 */
	window.toIndex = function(){
		Result.forward("index.html", {});
	};
	
	/**
	 * 跳到用户信息
	 */
	window.toUserInfo = function(){
		Result.forward("userInfos.html", {});
	};
	
	

}( window ) );
